﻿@{
    Layout = null;
}
@using WH.NurseSys.Model;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
    <title>移动护理系统</title>
    <style type="text/css">
        *{padding:0;margin:0;font-family:微软雅黑;}
        .nav_back{height:64px;background-color:#19A97B;color:#fff;font-size:16px;}
        .nav{width:1200px;height:64px;margin:0 auto;}
        .nav li{float:left;list-style-type:none;width:160px;text-align:center;line-height:64px;}
        .nav li a{text-decoration:none;color:White;display:block;}
        .nav li a:hover{background-color:#12976D;}
        #menuAccount{z-index:1;position:absolute;border-left:1px solid #19A97B;border-bottom:1px solid #19A97B;border-right:1px solid #19A97B;display:none;background-color:White;}
        #menuAccount li{float:none;list-style-type:none;}
        #menuAccount li a{text-decoration:none;display:block;color:Black;}
        .container{clear:both;width:1200px;margin:20px auto;}
        table{width:100%;border-collapse:collapse;margin-top:20px;}
        th{background-color:#F9FBFE;font-weight:normal;color:#333;border:1px solid #C0CDD9;height:38px;padding:3px 10px;text-align:left;}
        td{border:1px solid #C0CDD9;height:38px;color:#333;padding:3px 10px;}
    </style>
    <script type="text/javascript">
        function showMyInfo(){                        
            var menuUl = document.getElementById("menuAccount").style.display="block";            
        }
        function hideMyInfo(){
            document.getElementById("menuAccount").style.display="none";
        }
        function deleteDoctor(doctorId,doctorUsername) {
            if (confirm("是否要删除这个用户帐号\"" + doctorUsername + "\",删除后不可恢复")) {
                window.location = "/admin/doctor/delete/" + doctorId;
            }
        }      
    </script>
</head>
<body>
    <div class="nav_back">
        <div class="nav">
            <ul>
                <li><a href="/admin/doctor/list">用户</a></li>            
                <li><a href="/admin/dept/list">科室</a></li>
                <li><a href="/admin/patient/list">病人</a></li>
                <li onmouseover="showMyInfo()" onmouseout="hideMyInfo()">
                    <a href="#">我的帐号</a>
                    <ul id="menuAccount">
                        <li><a href="javascript:void(0)">帐号信息</a></li>
                        <li><a href="/admin/doctor/logout">退出</a></li>
                    </ul>
                </li>
            </ul>
        </div>        
    </div>
    <div class="container">
        <a href="/admin/Doctor/Insert">新建帐号</a>
        <table>
            <tr>
                <td>用户名</td>
                <td>昵称</td>
                <td>科室</td>
                <td>注册日期</td>
                <td>编辑</td>
                <td>删除</td>
            </tr>
            @{
                foreach(Doctor doctor in @Model as List<Doctor>)
                {
                    <tr>
                        <td>@doctor.Username</td>
                        <td>@doctor.Nickname</td>
                        <td>@doctor.DeptName</td>
                        <td>@doctor.AddDate.ToString("yyyy-MM-dd")</td>
                        <td><a href="javascript:void(0)">编辑</a></td>
                        <td><a href="javascript:void(0)" onclick="deleteDoctor('@doctor.Id','@doctor.Username')">删除</a></td>
                    </tr>
                }
            }
        </table>
    </div>
    

</body>
</html>
